<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>宅急送-送货</title>
    <script src="/resources/js/function/Session.js"></script>
    <link rel="stylesheet" href="/resources/css/cssLogin/bootstrap-theme.css"/>
    <script src="/resources/js/jsLogin/jquery.min.js"></script>
    <script src="/resources/js/jsLogin/bootstrap.js"></script>
    <link rel="stylesheet" href="/resources/layui/css/layui.css">
    <script src="/resources/layui/layui.js"></script>
    <script src="/resources/js/function/Random.js"></script>
    <script src="/resources/js/jsLogin/city-picker.js"></script>
    <script src="/resources/js/jsLogin/city-picker.data.js"></script>
    <link href="/resources/css/cssLogin/city-picker.css" rel="stylesheet" />

    <script>
        $(function(){
            var num=getRandom(10);
            console.log(num);
            $("#addval").val(num);
        })
    </script>
</head>
<style type="text/css">

</style>
<body>
<div class="container" style="width: 460px;">
    <div>
        <h3>请填写内容信息</h3>
    </div>
    <br>
    <form class="layui-form" action="">

        <div class="layui-form-item">
            <label class="layui-form-label">您的单号：</label>
            <div class="layui-input-block">
                <input type="text" name="order_id" required lay-verify="required" id="addval" placeholder="请输入标题" autocomplete="off" class="layui-input">
            </div>
        </div>

        <input type="hidden" name="user_id" id="user_id">

        <div class="layui-form-item">
            <label class="layui-form-label">您的物品：</label>
            <div class="layui-input-block">
                <input type="text" name="product" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">您手机号：</label>
            <div class="layui-input-block">
                <input type="text" name="phone" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
            </div>
        </div>

        <button class="layui-btn"  lay-event="ditu" onclick="a();">一个标准的按钮</button>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo" onclick="a();" name="add">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>




    <script>
        //Demo
        layui.use('form', function(){
            var form = layui.form;
            //监听提交
            form.on('submit(formDemo)', function(data){
                var da=JSON.stringify(data.field);
                layer.msg(da);
                $.get("http://localhost:8888/worksheerimpl/add",da,function(d){
                    alert(d);
                });
                return false;
            });
        });
    </script>

    <script>
        $(function(){
            var zhi=JSON.parse(sessionStorage.getItem(new Session().user_login));
            $("#user_id").val(zhi.id);
        });
    </script>

</div>
</body>
</html>


<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=vbdHb3GRObo7PyL18BZzW3EvOcIg5ok1"></script>
<script>
    function a(){
        $.get('Place.html',function(d){
            layer.open({
                type : 1,
                title : '地址',
                area:'800px',
                content:d,
                btn : ['确定','取消'],
                success:function(){
                    layui.form.render();
                }
                ,yes:function(){
                    var str = $("#form").serialize();
                    /*$.post(new Local().base_url+"/staff/wancheng",str,function(data){
                        layer.close(layer.index);
                        table.reload('dingdan');
                        layer.msg("任务已完成!");
                    });*/
                    layer.close(layer.index);
                    layer.msg("地址选择完成!");
                }
            });
        })
    }
</script>
